import {
	currentPage,
	paramsToStr
} from '@/utils/tools'
import Storage from '@/utils/storage'
import { StorageKey } from '@/utils/storage'

export default {
	data() { return {}},
	async onLoad(option) {
		const route = currentPage().route
		if (!['pages/login/login'].includes(route)) {
			Storage.set(StorageKey.BACK_URL, `/${route}${paramsToStr(option)}`)
		}
	}
}
